package com.appspot.modutajataja;

import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.Handler;

public class LogoActivity extends Activity {
	private MediaPlayer mediaPlayer;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_logo);

		Handler handler = new Handler();
		handler.postDelayed(new logoHandler(), 2500);
	}

	class logoHandler implements Runnable {

		@Override
		public void run() {
			startActivity(new Intent(LogoActivity.this, IntroActivity.class));
			overridePendingTransition(R.anim.fade, R.anim.hold);
			LogoActivity.this.finish();
		}
	}

	@Override
	protected void onResume() {
		super.onResume();
		mediaPlayer = MediaPlayer.create(this, R.raw.logo_bgm);
		mediaPlayer.start();
	} // end of onResume()
};